<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
use think\facade\Session;
class My extends controller
{
	//查看所有任务
    public function mytaskjoin()
    {
    	$uid=Session::get('uid');
    	$res=Db::table('tb_task_1')->where('uid',$uid)->select();
    	$this->assign('res',$res);
    	return $this->fetch('mytaskjoin');
	}
	public function mytaskjoin_do(){
		$uid=Session::get('uid');
    	$res=Db::table('tb_task_1')->where('uid',$uid)->select();
    	$this->assign('res',$res);
    	return $this->fetch('mytaskjoin');
	}
	//查看已抢单任务
	public function all()
	{
		$uid=Session::get('uid');
		$res=Db::table('tb_task_1')->where(['uid'=>$uid,'status'=>1])->select();
		$this->assign('res',$res);
    	return $this->fetch('all');
	}

	//查看待审核任务
	public function lock()
	{
		$uid=Session::get('uid');
		$res=Db::table('tb_task_1')->where(['uid'=>$uid,'status'=>2])->select();
		$this->assign('res',$res);
    	return $this->fetch('lock');
	}

	//查看通过任务
	public function pass()
	{
		$uid=Session::get('uid');
		$res=Db::table('tb_task_1')->where(['uid'=>$uid,'status'=>3])->select();
		$this->assign('res',$res);
    	return $this->fetch('pass');
	}

	//查看不通过任务
	public function nopass()
	{
		$uid=Session::get('uid');
		$res=Db::table('tb_task_1')->where(['uid'=>$uid,'status'=>4])->select();
		$this->assign('res',$res);
    	return $this->fetch('nopass');
    }
}
